translator.service({
  meta : {
    version : "0.0.1",
    shortName : "xerox",
    name : "Xerox - XRCE Language Identifier",
    icon : "chrome://translator/skin/services/xerox.png",
    desc : "",
    homepage : "http://www.xrce.xerox.com/"
  },

  detect : {
    url : "http://www.xrce.xerox.com/cgi-bin/mltt/LanguageGuesser",
    method : "GET",
    params: {Text :"{{text}}"},
    get : function (html) {
      var lang = html.split("<listing><font")[1].split(">")[1].split("</font")[0].split("_")[0].replace(/^\s+|\s+$/g,"").toUpperCase();
      return translator.languages.find(lang) || false;
    }
  }
});

